<?php
    //签名加密+yan
    $CERTI_KEY = '7pa72bA2hMmNn39d027frG4f34o71gb0c6U21ca4PQ35gb5zf4';
    // $GEN_SIGN = "Api_Lib_Rsp_UniApp_genSign"; //定义一个类,里面需要实现gen_sign方法作为签名方法
    //方法映射
    $api_array = array(
        'image.file.upload'=>array('class'=>'Api_Lib_Rsp_Image','method'=>'uploadImg','title'=>'图片上传通用'),
        // 测试
        'image.base64.upload'=>array(
            'class'  =>'Api_Lib_Rsp_Image',
            'method' =>'uploadImageBase64',
            'title'  =>'图片上传base64格式',
            'params' =>array(
                'Images'=>'图片内容(base64格式)'
            )
        ),
        'department.data.update' =>array(
            'class'  =>'Api_Lib_Rsp_Department',
            'method' =>'update',
            'title'  =>'新增/更新部门',
            'params' =>array(
                'depName'  => '部门名称',
            ),
        ),
        'department.data.list' =>array(
            'class'  =>'Api_Lib_Rsp_Department',
            'method' =>'getList',
            'title'  =>'获取部门列表',
            'params' =>array(
                'page'    => '页码',
                'pageNum' => '每页数量',
                'depName' => '筛选(部门)',
            ),
        ),
        'employ.data.update' =>array(
            'class'  =>'Api_Lib_Rsp_Employ',
            'method' =>'update',
            'title'  =>'新增/更新员工',
            'params' =>array(
                'employCode' => '员工编号',
                'employName' => '员工名称',
                'depId'      => '部门ID',
                'email'      => 'email',
                'mobile'     => 'mobile',
            ),
        ),
        'employ.data.list' =>array(
            'class'  =>'Api_Lib_Rsp_Employ',
            'method' =>'getList',
            'title'  =>'获取员工列表',
            'params' =>array(
                'page'       => '页码',
                'pageNum'    => '每页数量',
                'employName' => '筛选(员工名称)',
                'employCode' => '筛选(员工编号)',
                'linkId'     => '关联主键',
            ),
        ),
        'employ.data.delete' =>array(
            'class'  =>'Api_Lib_Rsp_Employ',
            'method' =>'delete',
            'title'  =>'删除员工',
            'params' =>array(
                'linkId'       => 'linkId',
            ),
        ),
        'client.data.update' =>array(
            'class'  =>'Api_Lib_Rsp_Client',
            'method' =>'updateClient',
            'title'  =>'新增/更新客户信息',
            'params' =>array(
                'compCode'  => '公司代码',
                'compName'  => '公司名称',
                'traderId'  => 'traderId',
                'people'    => '联系人',
                'tel'       => '电话',
                'mobile'    => '手机',
                'fax'       => '传真',
                'bank'      => '开户银行',
                'accountId' => '帐号',
                'taxId'     => '税号',
                'address'   => '地址',
                'email'     => '邮箱',
                'memo'      => '备注',
            ),
        ),
        'client.data.delete' =>array(
            'class'  =>'Api_Lib_Rsp_Client',
            'method' =>'delete',
            'title'  =>'删除客户',
            'params' =>array(
                'linkId'       => 'linkId',
            ),
        ),
        'client.data.update.lot' =>array(
            'class'  =>'Api_Lib_Rsp_Client',
            'method' =>'updateLot',
            'title'  =>'新增/更新客户信息：批量',
            'params' =>array(
                'compCode'  => '公司代码',
                'compName'  => '公司名称',
                'traderId'  => 'traderId',
                'people'    => '联系人',
                'tel'       => '电话',
                'mobile'    => '手机',
                'fax'       => '传真',
                'bank'      => '开户银行',
                'accountId' => '帐号',
                'taxId'     => '税号',
                'address'   => '地址',
                'email'     => '邮箱',
                'memo'      => '备注',
            ),
        ),
        'client.data.list' =>array(
            'class'  =>'Api_Lib_Rsp_Client',
            'method' =>'getList',
            'title'  =>'获取客户列表',
            'params' =>array(
                'page'     => '页码',
                'pageNum'  => '每页数量',
                'compCode' => '筛选(客户编号)',
                'compName' => '筛选(客户名称)',
            ),
        ),
        /*产品相关接口*/
        'product.kind.list' =>array(
            'class'  =>'Api_Lib_Rsp_Product',
            'method' =>'getKindList',
            'title'  =>'产品分类列表获取',
            'params' =>array(
                'kindName' => '筛选(分类名称)',
            ),
        ),
        'product.product.list' =>array(
            'class'  =>'Api_Lib_Rsp_Product',
            'method' =>'getProductList',
            'title'  =>'产品列表获取',
            'params' =>array(
                'page'    => '页码',
                'pageNum' => '每页数量',
                'proName' => '筛选(产品名称)',
                'proCode' => '筛选(产品编号)',
                'kindId'  => '筛选(类别id)',
            ),
        ),
        'product.product.update' =>array(
            'class'  =>'Api_Lib_Rsp_Product',
            'method' =>'updateProduct',
            'title'  =>'产品插入/更新',
            'params' =>array(
                'proName'  => '产品名称',
                'proCode'  => '产品编号',
                'kindId'   => '类别id(参考类别列表接口)',
                'filed1'   => '扩展1',
                'filed2'   => '扩展2',
                'filed3'   => '扩展3',
                'filed4'   => '扩展4',
                'filed5'   => '扩展5',
                'filed6'   => '扩展6',
                'filed7'   => '扩展7',
                'filed8'   => '扩展8',
                'filed9'   => '扩展9',
                'filed10'  => '扩展10',
                'filed11'  => '扩展11',
                'filed12'  => '扩展12',
                'filed13'  => '扩展13',
                'filed14'  => '扩展14',
                'filed15'  => '扩展15',
                'filed16'  => '扩展16',
                'filed17'  => '扩展17',
                'filed18'  => '扩展18',
                'filed19'  => '扩展19',
                'filed20'  => '扩展20',
                'pic'      => '图片(图片接口返回的imageId,多个图片id用英文","隔开)',
                'memo'     => '备注',
                'isSample' => '是否上架(0/1)',
            ),
        ),
        'product.product.update.lot' =>array(
            'class'  =>'Api_Lib_Rsp_Product',
            'method' =>'updateProductLot',
            'title'  =>'产品插入/更新:批量',
            'params' =>array(
                'proName'  => '产品名称',
                'proCode'  => '产品编号',
                'kindId'   => '类别id(参考类别列表接口)',
                'filed1'   => '扩展1',
                'filed2'   => '扩展2',
                'filed3'   => '扩展3',
                'filed4'   => '扩展4',
                'filed5'   => '扩展5',
                'filed6'   => '扩展6',
                'filed7'   => '扩展7',
                'filed8'   => '扩展8',
                'filed9'   => '扩展9',
                'filed10'  => '扩展10',
                'filed11'  => '扩展11',
                'filed12'  => '扩展12',
                'filed13'  => '扩展13',
                'filed14'  => '扩展14',
                'filed15'  => '扩展15',
                'filed16'  => '扩展16',
                'filed17'  => '扩展17',
                'filed18'  => '扩展18',
                'filed19'  => '扩展19',
                'filed20'  => '扩展20',
                'pic'      => '图片(图片接口返回的imageId,多个图片id用英文","隔开)',
                'memo'     => '备注',
                'isSample' => '是否上架(0/1)',
            ),
        ),
        'sample.ruku.update' =>array(
            'class'  =>'Api_Lib_Rsp_Sample_Ruku',
            'method' =>'updateSample',
            'title'  =>'样品间入库插入/更新',
            'params' =>array(
                'sid'       => '从表id',
                'rukuDate'  => array('title'=>'入库日期' ,'type'=>'calendar'),
                'purpose'   => '用途',
                'reason'    => '来源',
                'creater'   => '创建人',
                'memo'      => '备注',
                'productId' => '产品ID',
                'proDesc'   => '规格参数',
                'kuweiId'   => '库位ID',
                'code'      => '条码',
                'imageId'   => array('title'=>'图片ID','type'=>'image','limit'=>'3'),
                'type'      => '样品类型',
                'cnt'       => '样品数量',
            ),
        ),
        'sample.ruku.list' =>array(
            'class'  =>'Api_Lib_Rsp_Sample_Ruku',
            'method' =>'getRukuList',
            'title'  =>'样品入库列表获取',
            'params' =>array(
                'page'      => '页码',
                'pageNum'   => '每页数量',
                'productId' => '筛选(产品)',
                'kuweiId'   => '筛选(库位)',
                'type'      => '筛选(样品类型)',
                'proDesc'   => '筛选(规格参数)',
                'code'      => '筛选(条码)',
            ),
        ),
        'sample.ruku.list.distinct.code' =>array(
            'class'  =>'Api_Lib_Rsp_Sample_Ruku',
            'method' =>'getRukuCodeList',
            'title'  =>'样品入库条码汇总列表',
            'params' =>array(
                'page'      => '页码',
                'pageNum'   => '每页数量',
                'productId' => '筛选(产品)',
                'kuweiId'   => '筛选(库位)',
                'type'      => '筛选(样品类型)',
                'proDesc'   => '筛选(规格参数)',
                'code'      => '筛选(条码)',
            ),
        ),
        'sample.ruku.detial' =>array(
            'class'  =>'Api_Lib_Rsp_Sample_Ruku',
            'method' =>'getRukuInfo',
            'title'  =>'样品入库详细信息',
            'params' =>array(
                'sid'      => '入库列表中的sid',
            ),
        ),
        'sample.ruku.remove' =>array(
            'class'  =>'Api_Lib_Rsp_Sample_Ruku',
            'method' =>'rukuRemove',
            'title'  =>'样品入库删除',
            'params' =>array(
                'sid'      => '入库列表中的sid',
            ),
        ),
        'sample.chuku.update' =>array(
            'class'  =>'Api_Lib_Rsp_Sample_Chuku',
            'method' =>'updateSample',
            'title'  =>'样品间出库插入/更新',
            'params' =>array(
                'sid'       => '从表id',
                'chukuDate' => array('title'=>'出库日期' ,'type'=>'calendar'),
                'clientId'  => '客户ID',
                'employId'  => '采样人ID',
                'creater'   => '创建人',
                'memo'      => '备注',
                'code'      => '条码(扫码出库)',
                'productId' => '产品ID',
                'proDesc'   => '规格参数',
                'kuweiId'   => '库位ID',
                'type'      => '样品类型',
                'cnt'       => '出库数量',
                'price'     => '单价',
            ),
        ),
        'sample.chuku.list' =>array(
            'class'  =>'Api_Lib_Rsp_Sample_Chuku',
            'method' =>'getRukuList',
            'title'  =>'样品出库列表获取',
            'params' =>array(
                'page'      => '页码',
                'pageNum'   => '每页数量',
                'productId' => '筛选(产品)',
                'kuweiId'   => '筛选(库位)',
                'type'      => '筛选(样品类型)',
                'proDesc'   => '筛选(规格参数)',
                'code'      => '筛选(条码)',
            ),
        ),
        'sample.chuku.detial' =>array(
            'class'  =>'Api_Lib_Rsp_Sample_Chuku',
            'method' =>'getChukuInfo',
            'title'  =>'样品出库详细信息',
            'params' =>array(
                'sid'      => '出库列表中的sid',
            ),
        ),
        'sample.chuku.remove' =>array(
            'class'  =>'Api_Lib_Rsp_Sample_Chuku',
            'method' =>'chukuRemove',
            'title'  =>'样品出库删除',
            'params' =>array(
                'sid'      => '出库列表中的sid',
            ),
        ),
        // 权限相关，角色相关，登录状态相关
        'acm.user.update' =>array(
            'class'  =>'Api_Lib_Rsp_AcmUser',
            'method' =>'update',
            'title'  =>'用户表编辑(增改)',
            'params' =>array(
                'userName'     => '用户名',
                'passwd'       => '密码',
                'realName'     => '姓名',
                'phone'        => '手机',
                'shenfenzheng' => '身份证',
                'roleName'     => '角色名称:多角色用","隔开',//多角色用,隔开
            ),
        ),
        'acm.user.delete' =>array(
            'class'  =>'Api_Lib_Rsp_AcmUser',
            'method' =>'delete',
            'title'  =>'用户表编辑(删除)',
            'params' =>array(
                'userName'     => '用户名',
            ),
        ),
        // 权限相关，角色相关，登录状态相关
        'acm.user.list' =>array(
            'class'  =>'Api_Lib_Rsp_AcmUser',
            'method' =>'getList',
            'title'  =>'用户表列表',
            'params' =>array(
                'page'     => '页码',
                'pageNum'  => '每页数量',
                'userName' => '筛选(用户名)',
            ),
        ),
        'acm.func.role' =>array(
            'class'  =>'Api_Lib_Rsp_AcmUser',
            'method' =>'func2role',
            'title'  =>'获取权限说明配置',
            'params' =>array(

            ),
        ),
    );

?>